package com.sikaryofficial.backend.domain.mapping;

import com.sikaryofficial.backend.domain.dto.req.workOrder.UserWorkOrderSaveReq;
import com.sikaryofficial.backend.domain.dto.resp.workOrder.UserWorkOrderDTO;
import com.sikaryofficial.backend.domain.dto.resp.workOrder.UserWorkOrderDetailDTO;
import com.sikaryofficial.backend.domain.entity.UserWorkOrder;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author : qinjinyuan
 * @desc : 工单实体映射
 * @date : 2024/01/17 15:14
 */
@Mapper
public interface UserWorkOrderMapping {

    UserWorkOrderMapping INSTANCE = Mappers.getMapper(UserWorkOrderMapping.class);

    /**
     * 实体映射resp
     *
     * @param req
     * @return
     */
    UserWorkOrder coverReqToEntity(UserWorkOrderSaveReq req);

    /**
     * 实体映射resp
     *
     * @param req
     * @return
     */
    UserWorkOrderDTO coverToDTO(UserWorkOrder req);

    /**
     * 实体映射resp
     *
     * @param entity
     * @return
     */
    UserWorkOrderDetailDTO coverToDetailDTO(UserWorkOrder entity);
}
